import requestMeeting from '@/plugins/axios'
import { ChasingEntity } from './interface'

export const fetchGetChasingList = async (meetingMoid: string) =>
	requestMeeting<ChasingEntity[]>({
		url: `/mcc/${meetingMoid}/chasing`,
		method: 'get',
	}).then((res) => (res.success ? res.data : undefined))

export const fetchPostChasingList = async (meetingMoid: string, mt_ids: string[]) =>
	requestMeeting<ChasingEntity[]>({
		url: `/mcc/${meetingMoid}/chasing`,
		method: 'post',
		data: mt_ids,
	}).then((res) => (res.success ? res.data : undefined))
